home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
daten
/
ispell
/
source
/
amiga
/
interfaces
/
shell
/
spellcheckword.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-09-27
|
2KB
|
57 lines
/*rx
* SpellCheckWord.rexx --- program to spell check a word using the ISpell
* server and do some fancy magic with GUISpell if the word is incorrectly
* spelled.
*
* Something like the following works great in VLT 5.517 (27.3.92) or
* later (enter without line breaks into Operation/Mouse Support...):
*
* ~rx ("move %X %Y"; "extr reviewlineatcursor"; "move %x %y";
* s = " "vlt.reviewlineatcursor" "; a = lastpos(" ",s,%X+1);
* b = pos(" ",s,%X+1); "move "a b-1 %Y %Y;
* address command "spellcheckword" substr(s,a,b-a) "VLT")
*
* Thanks Willy for adding the features needed to do the above in VLT!
*
* Copyright © 1992 Loren J. Rittle
* Use as you will, just document your changes and keep my copyright
* notice intact. Feel free to mail enhancements to me.
*
* Loren J. Rittle
* rittle@comm.mot.com
* Wed May 13 05:56:10 1992
*/
options results
if left(address(), 4) ~== 'WSH_' then
address command
parse arg word PublicScreen .
if ~show(ports, 'IRexxSpell') then
do
'run <nil: >nil: ispell -r >nil: <nil:'
waitforport 'IRexxSpell'
end
address 'IRexxSpell' quickcheck word
if result = 'bad' then
do
if ~show(ports, 'GUISpell') then
do
'run <nil: >nil: GUISpell <nil: >nil:'
waitforport 'GUISpell'
end
if show(ports, 'GUISpell') then
do
if PublicScreen ~= '' then
address 'GUISpell' jump PublicScreen
address 'GUISpell' check word
end
else
address 'PingServer' beep
end
exit 0